www.gusucode.com > 环保时代家庭财务管理系统 EPffms v4.0 > 环保时代家庭财务管理系统 EPffms v4.0\code\eptimehome\tongji\total.asp
<!-- #include file="../conn.asp" --> <!-- #include file="fun.asp" --> <% '**************************************************** 'Code for EptimeFFMS 'Vision : v3.0 '**************************************************** %> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <!--[if !mso]> <style> v\:* { behavior: url(#default#VML) } o\:* { behavior: url(#default#VML) } .shape { behavior: url(#default#VML) } </style> <![endif]--> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="../images/admin.css" rel="stylesheet" type="text/css"> <style> body { background-color:#FFFFFF; } </style> <style> TD { FONT-SIZE: 9pt} </style> <script language=javascript> function preview() { bdhtml=window.document.body.innerHTML; sprnstr="<!--startprint-->"; eprnstr="<!--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); window.document.body.innerHTML=bdhtml; } </script> </HEAD> <BODY topmargin=5 leftmargin=0 scroll=AUTO> <!--当前导航--> <script type="text/JavaScript">if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='首页 » 报表统计 » 收支总表';</script> <script> function CheckAll(form) { for (var i=0;i<form.elements.length;i++) { var e = form.elements[i]; if (e.name != 'chkall') e.checked = form.chkall.checked; } } </script> <% '取得当前页码 currentpage=request("page") 'response.write currentpage 'response.end if currentpage<1 or currentpage="" then currentpage="1" end if '取得搜索关键字 nowstartdate=request("startdate") if nowstartdate="" then nowstartdate=date()-day(date()-1) end if nowenddate=request("enddate") if nowenddate="" then nowenddate=date() end if nowtype=request("type") nowEptime_admin=request("Eptime_admin") nowbigclass=request("bigclass") nowsmallclass=request("smallclass") if nowbigclass="" then nowsmallclass="" nowkeyword=request("keyword") %> <table width="95%" border="0" cellpadding="0" cellspacing="0" align="center"> <form name="form2"> <tr> <td width="50" height="30"> <img src="../images/print.jpg" align="absmiddle" style="cursor:hand;" onClick="preview();"></td> <td width="*" align="right"> <% sql="select * from Eptime_admin order by id desc" set rs_Eptime_admin=conn.execute(sql) %> <select name="Eptime_admin" onChange="form2.submit()"> <option value="">所有成员</option> <% do while rs_Eptime_admin.eof=false %> <option value="<%=rs_Eptime_admin("id")%>"<%if trim(cstr(rs_Eptime_admin("id")))=nowEptime_admin then%> selected="selected"<%end if%>><%=rs_Eptime_admin("realname")%></option> <% rs_Eptime_admin.movenext loop %> </select> 开始日期: <input name="startdate" value="<%=nowstartdate%>" readonly style="width:100px"> <img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('../day.asp?form=form2&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');"> 结束日期: <input name="enddate" value="<%=nowenddate%>" readonly style="width:100px"> <img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('../day.asp?form=form2&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');"> <input type="submit" value=" 统计 " class="button"> </td> </tr> </form> </table> <% sql="select * from Eptime_money where 1=1" if nowtype<>"" then sql=sql&" and type="&nowtype end if if nowEptime_admin<>"" then sql=sql&" and id_login="&nowEptime_admin end if if nowbigclass<>"" then sql=sql&" and id_bigclass="&nowbigclass end if if nowsmallclass<>"" then sql=sql&" and id_smallclass="&nowsmallclass end If If(databaseType=0) Then if nowstartdate<>"" then sql=sql&" and selldate-#"&nowstartdate&"#>=0" end if if nowenddate<>"" then sql=sql&" and selldate-#"&nowenddate&"#<=0" end if ElseIf(databaseType=1) Then if nowstartdate<>"" then sql=sql&" and selldate-'"&nowstartdate&"'>=0" end if if nowenddate<>"" then sql=sql&" and selldate-'"&nowenddate&"'<=0" end if End If if nowkeyword<>"" then sql=sql&" and (beizhu like '%"&nowkeyword&"%' or id_login in (select id from login where username like '%"&nowkeyword&"%'))" end if if request("order1")<>"" then sql=sql&" order by type "&request("order1") elseif request("order2")<>"" then sql=sql&" order by id_bigclass "&request("order2") elseif request("order3")<>"" then sql=sql&" order by id_smallclass "&request("order3") elseif request("order4")<>"" then sql=sql&" order by login "&request("order4") elseif request("order5")<>"" then sql=sql&" order by selldate "&request("order5") elseif request("order6")<>"" then sql=sql&" order by type,price "&request("order6") elseif request("order7")<>"" then sql=sql&" order by type desc,price "&request("order7") elseif request("order8")<>"" then sql=sql&" order by id_login "&request("order8") else sql=sql&" order by id desc" end if set count_buy = server.createobject("ADODB.RecordSet") count_buy.open sql,conn,1,3 nowprice1=0 nowprice2=0 do while count_buy.eof=false if count_buy("type")=0 then nowprice1=nowprice1+count_buy("price") else nowprice2=nowprice2+count_buy("price") end if count_buy.movenext loop %> <table width="95%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED"> <tr> <td><img src="../images/r_1.gif" alt="" /></td> <td width="100%" background="../images/r_0.gif"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> </td> <td align="right">盈亏:<b><%=formatnumber(nowprice1-nowprice2,2)%></b> 元, 收入合计:<b><%=formatnumber(nowprice1,2)%></b> 元, 支出合计:<b><%=formatnumber(nowprice2,2)%></b> 元 </td> </tr> </table> </td> <td><img src="../images/r_2.gif" alt="" /></td> </tr> <tr> <td></td> <td> </td> <td></td> </tr> <tr> <td><img src="../images/r_4.gif" alt="" /></td> <td></td> <td><img src="../images/r_3.gif" alt="" /></td> </tr> </table> <!--startprint--><br><strong> <%If nowEptime_admin="" Then %>【整个家庭】<%Else set rs=conn.execute("select * from Eptime_admin where id="&nowEptime_admin)%> 【<%=rs("realname")%>】<%End if%>从【<%=nowstartdate%>】到【<%=nowenddate%>】收支汇总表</strong> <% dim total(10,2) If nowprice1="0" Then total(1,1)=0 else total(1,1)=nowprice1 End if If nowprice2="0" Then total(2,1)=0 else total(2,1)=nowprice2 End if total(1,2)="总收入" total(2,2)="总支出" total_no=2 %> <%call table1(total,1,120,10,25,700,200,"A")%> <!--endprint--> </body> </html>